﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using AAA.Meta.Chart;

namespace AAA.Chart.Indicator
{
    public class CandleStick : DefaultIndicator
    {
        public CandleStick(string strName)
        {
            ChartStyle = ChartStyleEnum.CandleStick;
            Name = strName;
            DataField = DataTypeEnum.CandleStick;
        }

        public override void Calculate()
        {
            Plot(DataSource.GetData(BaseStudy).GetData(DataTypeEnum.Open),
                 DataSource.GetData(BaseStudy).GetData(DataTypeEnum.High),
                 DataSource.GetData(BaseStudy).GetData(DataTypeEnum.Low),
                 DataSource.GetData(BaseStudy).GetData(DataTypeEnum.Close),
                 Name, Color.White, Color.White, 5);
        }
    }
}
